﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq.Expressions;
using SBACN.WebSite.Models;
using SBACN.WebSite.Code;

namespace SBACN.WebSite.MonthlyEvent
{
	public partial class DayEvent :BasePage
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			string D = Request.QueryString["d"];
			BindDate(D);
		}

		protected void BindDate(string D)
		{
			if (!string.IsNullOrWhiteSpace(D))
			{
				DateTime DT = Convert.ToDateTime(D);
				Expression<Func<TB_MonthlyEvents, bool>> f = (p => (p.EventDate == DT));
				Expression<Func<TB_MonthlyEvents, string>> order = (c => (c.StartHour));
				var result = DAL.DALHelper.Instance.GetList<TB_MonthlyEvents, string>(f, order, true);

				this.List.DataSource = result;
				this.List.DataBind();
			}



		}
	}
}